package org.as.sdg.objs;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name = "DRAMA")
public class Drama implements Serializable {
	/**
	 * 
	 */
	private static final long serialVersionUID = 2000180420326693915L;
	private Long dramaId;
	private String title;
	private Date screenDate;
	private String summary;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "idGenerator")
	@GenericGenerator(name = "idGenerator", strategy = "native")
	@Column(name = "ID", unique = true, nullable = false, precision = 20, scale = 0)
	public Long getDramaId() {
		return dramaId;
	}

	public void setDramaId(Long dramaId) {
		this.dramaId = dramaId;
	}

	@Column(name = "TITLE", length = 100, nullable = false, unique = true, insertable = true)
	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "SCREEN_DATE", insertable = true)
	public Date getScreenDate() {
		return screenDate;
	}

	public void setScreenDate(Date screenDate) {
		this.screenDate = screenDate;
	}

	@Column(name = "SUMMARY", length = 2000, insertable = true)
	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

}
